# _*_ coding:utf-8 _*_
import xadmin

from .models import CityDict, CourseOrg, Teacher

# Create your models here.


class CityDictAdmin(object):
    list_display = ["name", "desc", "add_time"]
    search_fields = ["name", "desc"]
    list_filter = ["name", "desc", "add_time"]


class CourseOrgAdmin(object):
    list_display = ["desc", "tag", "category", "click_nums", "fav_nums", "image", "address", "city", "students", \
                    "course_nums", "add_time"]
    search_fields = ["desc", "tag", "category", "click_nums", "fav_nums", "image", "address", "city", "students", \
                     "course_nums"]
    list_filter = ["desc", "tag", "category", "click_nums", "fav_nums", "image", "address", "city", "students", \
                   "course_nums", "add_time"]


class TeacherAdmin(object):
    list_display = ["org", "name", "work_years", "work_company", "work_position", "points", "click_nums", "fav_nums", "age",
                    "image", "add_time"]
    search_fields = ["org", "name", "work_years", "work_company", "work_position", "points", "click_nums", "fav_nums", \
                     "age", "image"]
    list_filter = ["org", "name", "work_years", "work_company", "work_position", "points", "click_nums", "fav_nums", \
                   "age", "image", "add_time"]


xadmin.site.register(CityDict, CityDictAdmin)
xadmin.site.register(CourseOrg, CourseOrgAdmin)
xadmin.site.register(Teacher, TeacherAdmin)
